#ifndef LOGFILEDECODER_H
#define LOGFILEDECODER_H

#include <QThread>
#include <QTextStream>

class QMutex;
class QFile;

class LogFileDecoder : public QThread
{
    Q_OBJECT

public:
    LogFileDecoder(QObject *parent=0);
    ~LogFileDecoder();

public slots:
    void requestDecode(QString filename);
    void abortDecode();

signals:
    void decodeFinished();

protected:
    void run();

private:
    void finishDecode();

    bool quit;
    QMutex *mutex;
    QFile *logFile;
    QFile *csvFile;
    QTextStream output; //outputs to csvFile once it is created
};

#endif // LOGFILEDECODER_H
